<!DOCTYPE html>
<html>
<head>
<title>Weiran ECMAScript Applications Framework</title>
<link rel=stylesheet type=text/css href=./style.css>
</head>

<body>

<div class=leftbar>
    <h1>Weiran</h1>
    <p>ECMAScript<br />Applications Framework</p>
    <p>Version: 1.2</p>
    <ul>
	<li><a href=Weiran.html>Weiran</a></li>
	<li><a href=Weiran.Array.html>Weiran.Array</a></li>
	<li><a href=Weiran.Buffer.html>Weiran.Buffer</a></li>
	<li>Weiran.Class<ul>
	    <li><a href=#Weiran.inherit>Weiran.inherit</a></li>
	    <li><a href=#Weiran.Class>Weiran.Class</a></li>
	</ul></li>
	<li><a href=Weiran.Date.html>Weiran.Date</a></li>
	<li><a href=Weiran.DB.html>Weiran.DB</a></li>
	<li><a href=Weiran.Event.html>Weiran.Event</a></li>
	<li><a href=Weiran.Events.html>Weiran.Events</a></li>
	<li><a href=Weiran.Function.html>Weiran.Function</a></li>
	<li><a href=Weiran.JSON.html>Weiran.JSON</a></li>
	<li><a href=Weiran.Lang.html>Weiran.Lang</a></li>
	<li><a href=Weiran.Number.html>Weiran.Number</a></li>
	<li><a href=Weiran.String.html>Weiran.String</a></li>
	<li><a href=Weiran.GRUB.html>GRUB Mechanism</a></li>
    </ul>
    <p>
        Copyright &copy; All<span>i</span>dylls<br />
        2011 - 2012
    </p>
</div>

<div class=content>

<div class=reftitle>Weiran.Class</div>
<p>The class menufactory.
	    All Weiran styled class hierarchies should be constructed by this fundamental function.</p>

<a name=Weiran.inherit></a>
<h3><code>Weiran.inherit(C, P)</code></h3>
<p><b>Static method</b></p>
<p>
    <b>Parameters: </b><br />
    <span class=parameters>C</span> - <code>class</code>, the class that inherits<br />
    <span class=parameters>P</span> - <code>class</code>, the superclass to inherit from
</p>
<p><b>Returns: </b><code>undefined</code></p>
<p>In addition to the mandatory C and P parameters, an arbitrary number of
     objects can be passed, which will extend C.</p>

<a name=Weiran.Class></a>
<h3><code>Weiran.Class(P, proto)</code></h3>
<p><b>Static method</b></p>
<p>
    <b>Parameters: </b><br />
    <span class=parameters>P</span> - <code>class</code>, parent class<br />
    <span class=parameters>proto</span> - <code>object</code>, prototype object
</p>
<p><b>Returns: </b><code>class</code></p>
<p>Defines a class, including support for multiple inheritance.    
            To create a new Weiran styled class, use the following syntax:<br />
            &nbsp;&nbsp;<code>var MyClass = Weiran.Class(prototype);</code><br />
            To create a new Weiran styled class with multiple inheritance, use the following syntax:<br />
            &nbsp;&nbsp;<code>var MyClass = Weiran.Class(Class1, Class2, prototype);</code><br />
            Note that <code>instanceof</code> reflection will only reveal Class1 as superclass.</p>
<p>A Weiran styled class does have a member function <code>initialize</code> as the constructor which will be called
    immediately when an instance object of this class is created with <code>new</code> operator.
</p>
</div>

</body>
</html>
